package com.mayikt.controller;

import com.mayikt.entity.TestEntity;
import com.mayikt.service.TestService;
import com.mayikt.utils.RedisTemplateUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RequestMapping("/test")
@RestController
public class TestController {
    @Resource
    private TestService testService;

    @GetMapping("/getHello")
    public String getHello() {
        return "hello world";
    }

    @GetMapping("/getTestList")
    public List<TestEntity> getTestList() {
        return testService.getTestList();
    }
}
